<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<div class="nav nav-tabs">
			<h4>买家列表</h4>
		</div>
		<form class="well form-inline margin-top-20" method="get" action="{:url('index')}">
			类别:
			<select class="form-control" name="category" style="width: 140px;">
				<option value="0">全部</option>
				<volist name="cate" id="vo">
					<option value="{$vo.id}" <eq name="vo.id" value="$where_r.category|default=0">selected</eq> >{$vo.name}</option>
				</volist>
			</select> &nbsp;
			来源:
			<select class="form-control" name="source" style="width: 140px;">
				<option value='0'>全部</option>
				<volist name="source" id="vo">
					<option value="{$vo.id}" <eq name="vo.id" value="$where_r.source|default=0">selected</eq> >{$vo.name}</option>
				</volist>
			</select> &nbsp;
			客户类型:
			<select class="form-control" name="nature" style="width: 80px;">
				<option value='0'>全部</option>
				<volist name="nature" id="vo">
					<option value="{$vo.id}" <eq name="vo.id" value="$where_r.nature|default=0">selected</eq> >{$vo.name}</option>
				</volist>
			</select> &nbsp;
			状态:
			<select class="form-control" name="is_done" style="width: 80px;">
				<option value='0'>全部</option>
				<option value='1' <eq name="where_r.is_done|default=0" value="1">selected</eq> >未成交</option>
				<option value='2' <eq name="where_r.is_done|default=0" value="2">selected</eq> >已成交</option>
			</select> &nbsp;
			时间:
			<input type="text" class="form-control js-bootstrap-date" name="start_time"
				   value="{$where_r.start_time|default=''}"
				   style="width: 80px;" autocomplete="off">-
			<input type="text" class="form-control js-bootstrap-date" name="end_time"
				   value="{$where_r.end_time|default=''}"
				   style="width: 80px;" autocomplete="off"> &nbsp;
			<input type="text" class="form-control" name="keyword" style="width: 200px;"
				   value="{$where_r.keyword|default=''}" placeholder="请输入关键字...">
			<input type="submit" class="btn btn-primary" value="搜索"/>
			<a class="btn btn-danger" href="{:url('index')}">清空</a>
		</form>

		<div class="table-actions">
			<div class="btn-group">
				<if condition="auth_check('add')"><a href="{:url('add')}" class="btn btn-default">新增</a></if>
			</div>
		</div>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<!-- <th width="15">
						<label>
							<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
						</label>
					</th> -->
					<th>客户名称</th>
					<th>创建日期</th>
					<th>需求产品类别</th>
					<th width="300">跟进信息</th>
					<th>客户类型</th>
					<th>录入人</th>
					<th>状态</th>
					<th width="130">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="lists" item="vo">
				<tr>
					<!-- <td>
						<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
							   value="{$vo.id}" title="ID:{$vo.id}">
					</td> -->
					<td>{$vo.name|strstar}</td>
					<td>{$vo.createtime|date="Y-m-d",###}</td>
					<td>{$vo.cname}</td>
					<td>{$vo.evolve}</td>
					<td>{$vo.nname}</td>
					<th>{$vo.uname}</th>
					<th>{$vo.is_done?'已成交':'未成交'}</th>
					<td>
						<if condition="auth_check('show')"><a href='javascript:parent.openIframeLayer("{:url("show",["pid" => $vo["id"]])}","跟进记录")'>跟进记录</a></if>
						<a href='{:url("lock",array("id"=>$vo["id"]))}' class="js-ajax-dialog-btn"
						   data-msg="是否锁定该条数据？">锁定</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}<li><a>共计 {$lists->total()} 条</a></li><li>
			<input class="page" type="text" name="pageNum" value="{$lists->getCurrentPage()}"/>
			<a class="topage" data-url="{$lists->getCurrentPath()}">跳转</a>
			</li></div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>